import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
import _createClass from "@babel/runtime/helpers/esm/createClass";
import _inherits from "@babel/runtime/helpers/esm/inherits";
import _createSuper from "@babel/runtime/helpers/esm/createSuper";

var _dec, _class;

import React, { Component } from 'react';
import { Modal, Form, Button, Spin } from 'antd';
import intl from 'utils/intl';
var LogModal = (_dec = Form.create({
  fieldNameProp: null
}), _dec(_class = /*#__PURE__*/function (_Component) {
  _inherits(LogModal, _Component);

  var _super = _createSuper(LogModal);

  function LogModal() {
    _classCallCheck(this, LogModal);

    return _super.apply(this, arguments);
  }

  _createClass(LogModal, [{
    key: "render",
    value: function render() {
      var _this$props = this.props,
          onOk = _this$props.onOk,
          logDetail = _this$props.logDetail,
          logVisible = _this$props.logVisible,
          logDetailLoading = _this$props.logDetailLoading;
      return /*#__PURE__*/React.createElement(Modal, {
        title: intl.get('csdr.jobLog.model.jobLog.logDetail').d('日志详情'),
        wrapClassName: "ant-modal-sidebar-right",
        transitionName: "move-right",
        visible: logVisible,
        width: 600,
        destroyOnClose: true,
        closable: false,
        footer: /*#__PURE__*/React.createElement(Button, {
          type: "primary",
          onClick: onOk
        }, intl.get('cpaas.common.button.ok').d('确定'))
      }, /*#__PURE__*/React.createElement(Spin, {
        spinning: logDetailLoading
      }, /*#__PURE__*/React.createElement("pre", {
        dangerouslySetInnerHTML: {
          __html: logDetail
        }
      })));
    }
  }]);

  return LogModal;
}(Component)) || _class);
export { LogModal as default };